
#include "bullet.h"
#include "unit.h"
#include "animation.h"

float Bullet::GRAVITY = -1000;
int Bullet::BULLET_SEED = 1;

Bullet::Bullet() :
 animation(nullptr)
, sprite(nullptr)
, unitID(0)
, meleeDamage(0.0f)
, rangedDamage(0.0f)
, damageRange(0.0f)
, src(0.0f, 0.0f)
, dst(0.0f, 0.0f)
, speed(0.0f, 0.0f)
, isHitTarget(false)
, target(nullptr)
, type(BulletType::slash)
{
}

Bullet::~Bullet() {
    if(animation) {
		animation->removeFromParent();
    }

	if(sprite) {
		sprite->removeFromParent();
	}
}

void Bullet::init(){

}

bool Bullet::update(float ticks) {
	isHitTarget = true;
	return false;
}
